<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:c="http://java.sun.com/jstl/core"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:t="http://myfaces.apache.org/tomahawk">


<f:view>
	<f:loadBundle var="messages" basename="messages" />

	<head>
	<title>Manter Avaliacoes</title>
	<style type="text/css">
.jscalendar-DB-div-style {
	position: absolute;
	margin-top: -69px;
	margin-left: -408px;
}
</style>
	</head>

	<h:messages errorClass="error" layout="table" style="width: 100%" />

	<p>Preencha as informacoes abaixo:</p>

	<h:form id="avaliacaoForm">
		<h:inputHidden value="#{avaliacaoForm.avaliacao.id}">
			<f:convertNumber />
		</h:inputHidden>
		<h:panelGrid columns="3" styleClass="detail" columnClasses="label">
			<h:outputLabel value="Usuario:" for="categoria" />
			<h:selectOneMenu id="usuario" value="#{avaliacaoForm.usuario.id}">
				<f:selectItems value="#{avaliacaoForm.usuarios}" />
			</h:selectOneMenu>

			<br />
			<h:outputLabel value="Conteudo:" for="conteudo" />
			<h:selectOneMenu id="conteudo" value="#{avaliacaoForm.conteudo.id}">
				<f:selectItems value="#{avaliacaoForm.conteudos}" />
			</h:selectOneMenu>
			<br />
			  <h:outputLabel value="Avaliacao:" for="nota" />
			<h:selectOneMenu  value="#{avaliacaoForm.avaliacao.nota}" id="nota">
			 <f:selectItem itemValue="1" />
			 <f:selectItem itemValue="2" />
			 <f:selectItem itemValue="3" />
			 <f:selectItem itemValue="4" />
			 <f:selectItem itemValue="5" />
			</h:selectOneMenu>
			<h:message for="nota" styleClass="errrorMessage" /> 

			<br></br>


			<h:panelGroup>
				<h:commandButton value="Salvar" action="#{avaliacaoForm.save}"
					id="save" styleClass="button" />
				<c:if test="${not empty avaliacaoForm.id}">
					<h:commandButton value="Delete" action="#{avaliacaoForm.delete}"
						id="delete" styleClass="button" />
				</c:if>
				<h:commandButton value="Cancel" action="cancel" immediate="true"
					id="cancel" styleClass="button" />
			</h:panelGroup>
			<h:inputHidden value="" />
		</h:panelGrid>
	</h:form>

	<script type="text/javascript">
    Form.focusFirstElement(document.forms['avaliacaoForm']);
</script>

</f:view>
</html>
